Information processing device and information processing method

ABSTRACT

An information processing device is applied to computation of a network connecting nodes of a neural network. A number of rows or a number of columns of a weighting matrix of the network is made a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data. Then, a weight component of the reduced number of rows or number of columns is multiplied with a vector of the input data, a matrix of the results of the multiplication is divided into a partial matrix for every certain number of columns or number of rows, and a sum of matrices is taken for every partial matrix obtained by the dividing.

TECHNICAL FIELD

The present invention relates to an information processing device and an information processing method for performing computation of a neural network used for artificial intelligence, particularly to a technology for reducing the amount of computation when performing computation of a neural network.

BACKGROUND ART

Neural networks (hereafter referred to as “NN”) that have particularly high recognition performance and prediction performance, such as deep neural networks (hereafter referred to as “DNN”) with a deep layer structure and convolutional neural networks (hereafter referred to as “CNN”), are provided via internee services or clouds or by being mounted on equipment, in the form of applications for smartphones, vehicle equipment, household electrical equipment, factory equipment, robots, and the like.

CITATION LIST Non-Patent Literature

NON-PATENT LITERATURE 1: Coates, Adam, Huval, Brody, Wang, Tao, Wu, David, Catanzaro, Bryan, and Andrew, Ng. “Deep learning with cots hpc systems.” In Proceedings of The 30th International Conference on Machine Learning, pp. 1337-1345, 2013.

NON-PATENT LITERATURE 2: R. Vershynin, On the role of sparsity in Compressed Sensing and Random Matrix Theory, CAMSAP' 09 (3rd International Workshop on Computational Advances in Multi-Sensor Adaptive Processing), 2009, 189-192.

SUMMARY Problems to be Solved by the Invention

However, NNs such as DNNs and CNNs that are frequently adopted as implementations of typical artificial intelligence functionality have large amounts of computation, and require preparation of a large-scale server for a computer resource, or implementation of an additional unit, such as a graphics processing unit (hereafter referred to as “GPU”). Accordingly, there is a problem that the introduction of an intelligence installation or implementation of the same on equipment becomes expensive, or that large power consumption is required.

The present invention has been made in view of the above circumstance, and an object of the present invention is to provide an artificial intelligence function or service with which it is possible to achieve a decrease in size and power consumption and which can be mounted on general-purpose equipment, with greatly reduced computer resource by reducing the amount of computation of an NN such as a DNN or a CNN.

Solution to the Problems

An information processing device of the present invention includes a computation processing unit for achieving an artificial intelligence function by performing computation of a neural network with respect to input data. The computation processing unit makes a number of rows or a number of columns of a weighting matrix for computing a network connecting nodes in the neural network a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data, multiplies a weight component of the reduced number of rows or number of columns with a vector of the input data, divides a matrix of a result of the multiplication into a partial matrix for every certain number of columns or number of rows, and takes a sum of matrices for every partial matrix obtained by the dividing.

Moreover, an information processing method of the present invention features a computation processing method for achieving an artificial intelligence function by performing computation of a neural network with respect to input data. The information processing method includes: a reducing step of making a number of rows or a number of columns of a weighting matrix for computing a network connecting nodes in the neural network a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data; a multiplication step of multiplying a weight component of the number of rows or the number of columns reduced in the reducing step with a vector of the input data; a dividing step of dividing a matrix of a result obtained in the multiplication step into a partial matrix for every certain number of columns or number of rows; and a sum-computing step of taking a sum of matrices for every partial matrix obtained by the dividing in the dividing step.

According to the present invention, it is possible to greatly reduce a computer resource for achieving an artificial intelligence function, making it possible to reduce the space occupied by the computer, or the price or power consumption thereof. Accordingly, when an artificial intelligence function is mounted on equipment, it becomes possible to perform computation of a neural network by using low-priced CPUs or general-purpose field-programable gate arrays (FPGA) or LSIs, thus achieving a decrease in size, price, and power consumption and an increase in speed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of the structure of a DNN.

FIG. 2 illustrates an example of pretraining (performed for each layer) in an autoencoder.

FIG. 3 illustrates an example of recognition of a handwritten numeral by the present invention.

FIG. 4 illustrates how a vector of an intermediate node of the DNN is obtained.

FIG. 5 schematically illustrates a compressed state according to a first embodiment of the present invention.

FIG. 6 schematically illustrates a divided state according to the first embodiment of the present invention.

FIG. 7 illustrates a computation example for performing shifting according to the first embodiment of the present invention.

FIG. 8 illustrates a circuit configuration example for performing the computation of FIG. 7.

FIG. 9 illustrates a computation example for performing random permutation according to the first embodiment of the present invention.

FIG. 10 illustrates circuit configuration example for performing the computation of FIG. 9.

FIG. 11 illustrates flowcharts comparing the process flow (step S11 to S20) of a typical DNN and the process flow (step S21 to S31) according to the first embodiment of the present invention.

FIG. 12 illustrates a characteristics chart indicating an example of change in accuracy rate at compression ratios according to the first embodiment of the present invention.

FIG. 13 illustrates an example of a CNN structure.

FIG. 14 schematically illustrates a compressed state according to a second embodiment of the present invention.

FIG. 15 illustrates a concrete example of the compressed state according to the second embodiment of the present invention.

FIG. 16 compares a typical process (a) and a process (b) according to the second embodiment of the present invention.

FIG. 17 compares a typical process (a) with a process (b) according to the second embodiment of the present invention.

FIG. 18 illustrates flowcharts comparing the process flow (step S41 to S51) of a typical CNN and the process flow (step S61 to S73) according to the second embodiment of the present invention.

FIG. 19 illustrates a process according to a modification of an embodiment of the present invention.

FIG. 20 is a block diagram illustrating an example of hardware configuration to which an embodiment of the present invention is applied.

DESCRIPTION OF THE EMBODIMENTS

A first embodiment of the present invention will be described with reference to FIG. 1 to FIG. 12. The first embodiment is an example applied to a deep neural network (DNN).

Based on FIG. 1, the structure of the DNN will be defined. First, let the input signal be an N-dimension vector:

x=(x ₁ , x ₂ , . . . , x _(N))^(T)∈

^(N)

where (*)^(T) indicates the transpose of a matrix. A multilayer structure is expressed using l indicating the index of layers such that l=1, 2, 3, . . . . Also,

means a real number.

Let a vector

u ^((l))=(u ₁ ^((l)) , u ₂ ^((l)) , . . . , u _(J) ^((l)))^(T)∈

^(J)

be the vector of the sum of the weighting coefficients of the first layer to be computed as:

u _(J) ^((l))=Σ_(i=1) ^(J) w _(i,j) ^((l)) x _(i) ^((l)) +b _(i) ^((l)).

Here,

$W^{(l)} = \begin{bmatrix} w_{1,1}^{(l)} & \ldots & w_{1,I}^{(l)} \\ \vdots & \ddots & \vdots \\ w_{j,1}^{(l)} & \ldots & w_{J,I}^{(l)} \end{bmatrix}$

is a weighting matrix, and

b ^((l))=(b ₁ ^((l)) , b ₂ ^((l)) , . . . , b _(J) ^((l)))^(T)∈

^(j)

is a bias vector.

With respect to a given u_(j) ⁽¹⁾, an activation function f generates the input vector x_(j) ^(l+1)) of the next l+1 layer by performing a computation x_(j) ^((l+1))=f(u_(j) ^((l))) for each node.

For simplified description, it will be hereafter assumed that b_(j) ^((l))=0 and f(u)=u.

Generally, a DNN performs pretraining by unsupervised learning using a stacked autoercoder, prior to supervised learning for identification. As illustrated in FIG. 2, in this autoencoder, the purpose is to acquire major information of an input signal of a higher dimension and to transform it into feature data of a lower dimension. In each layer, learning is performed so as to minimize the difference between data reconstructed by using the autoencoder and the input data. The learning is implemented by means of e.g. a gradient descent method or a backpropagation method, for each layer from a lower layer to an upper layer.

With respect to a network layer represented by x^((l+1))=W^((l))x^((l)), the weighting matrix

Ŵ^((l))

is used to complete

{circumflex over (x)} ^((l)) =Ŵ ^((l)) x ^((l+1)),

thereby generating, from x^((l+1)), a reconstruction vector

{circumflex over (x)}^((l)).

During learning of the autoencoder, an optimization problem for determining

$\underset{{\{ w^{(l)}\}}{\{{\hat{w}}^{(l)}\}}}{argmin}\; {{x^{(l)} - {\hat{x}}^{(l)}}}_{2}^{2}$

is solved so as to derive a weighting matrix

W^((l))≈Ŵ^((l)T)

and

x^((l+1)),

where the length of the vector of x^((l)) is J^((l)).

Generally, because J^((l+1))≤J^((l)), the autoencoder reduces the dimension of data.

That is, this may be considered a problem to reconstruct the original signal x^((l)) from the dimensionally compressed signal x^((l+1)) using W^((l)).

Conversely, the weighting matrix W^((l)) only needs to have characteristics for reconstructing the original signal x^((l)) from the dimensionally compressed signal x^((l+1)).

For example, in the paper indicated as NON-PATENT LITERATURE 2, it is shown that it is possible to reproduce the original signal vector from a compressed-dimension vector using, for W^((l)), a matrix of which the components are randomly selected from a standard Gaussian distribution.

Here, referring to FIG. 3, an example in which the DNN has been applied for recognition of a handwritten numeral will be described.

For example, as illustrated in FIG. 3, assuming that the handwritten numeral “5” is expressed by a vector x⁽¹⁾, a dimensionally compressed vector x⁽²⁾ is obtained by matrix multiplication with a random matrix W⁽¹⁾. It is shown that even when it is currently not known what picture the vector x⁽¹⁾ is like, the vector x⁽¹⁾ can be reproduced from the vector x⁽²⁾ and the random matrix W⁽¹⁾, and that it is consequently possible to reproduce the handwritten numeral “5”.

Meanwhile, techniques that satisfy the randomness of a weighting matrix other than the technique that randomly selects the matrix components are conceivable. The present invention indicates a configuration method focusing on this point.

A weighting matrix configuration method indicating this characteristic will be described below.

Here, an example will be described with reference to the DNN for use in recognizing a handwritten numeral, as illustrated in FIG. 3.

If the input signal is a handwritten character of a size of 28×28=784 pixels, the length of the vector of the input signal x⁽¹⁾ of the first layer is N=784 If the length of the vector of the node x⁽²⁾ of the second layer as an intermediate layer is M=500, the 500×784 weighting matrix W¹ is multiplied by the input signal vector x¹, as illustrated in FIG. 3, whereby the signal x⁽²⁾ of an intermediate node that has been compressed dimensionally is obtained.

FIG. 4 illustrates how in this case the vector x⁽²⁾ of the intermediate node is obtained by the matrix computation of the weighting matrix W⁽²⁾ and the input signal vector x⁽¹⁾.

In this case, the number of times of multiplication involving a large amount of computation is M×N=500×784=392000 times.

FIG. 4 and FIG. 5 illustrate a network compression method according to the present embodiment. Typical DNNs require the product with respect to the M×N components with respect to the input vector length N and the output vector length M for each layer, the number of times of taking the product resulting in an increase in the amount of computation.

In the present embodiment, a method for compressing _(—) original weighting matrix of M×N=500×784 to M′×N=10×784 will be described, as illustrated in FIG. 5.

First, a weighting matrix which is compressed compared to a typical example is prepared, and a computing method under the compressed weighting matrix will be described. In addition, the reason why the computing method of the present invention results in hardly any decrease in accuracy will be described, and the relevant hardware configuration example and a flowchart example will be indicated.

Let the compressed weighting matrix be

{tilde over (W)}⁽¹⁾.

Also, when the compression ratio is expressed as γ, the compression ratio is γ=M′/M= 10/500= 1/50.

The weighting matrix

{tilde over (W)}⁽¹⁾

is used to perform the following computation:

${{\overset{\sim}{W}}^{(1)} \circ x^{(1)}} = {{\begin{bmatrix} {\overset{\sim}{w}}_{1,1}^{(1)} & \ldots & {\overset{\sim}{w}}_{1,I}^{(1)} \\ \vdots & \ddots & \vdots \\ {\overset{\sim}{w}}_{j,1}^{(1)} & \ldots & {\overset{\sim}{w}}_{J,I}^{(1)} \end{bmatrix} \circ \begin{bmatrix} x_{1}^{(1)} & \ldots & x_{I}^{(1)} \end{bmatrix}} = {\quad{{\begin{bmatrix} {{\overset{\sim}{w}}_{1,1}^{(1)} \cdot x_{1}^{(1)}} & \ldots & {{\overset{\sim}{w}}_{1,I}^{(1)} \cdot x_{I}^{(1)}} \\ \vdots & \ddots & \vdots \\ {{\overset{\sim}{w}}_{j,1}^{(1)} \cdot x_{1}^{(1)}} & \ldots & {{\overset{\sim}{w}}_{J,I}^{(1)} \cdot x_{I}^{(1)}} \end{bmatrix} = \begin{bmatrix} {{\overset{\sim}{w}}_{1,1}^{(1)} \cdot x_{1}^{(1)}} & \ldots & {{\overset{\sim}{w}}_{1,784}^{(1)} \cdot x_{784}^{(1)}} \\ \vdots & \ddots & \vdots \\ {{\overset{\sim}{w}}_{10,1}^{(1)} \cdot x_{1}^{(1)}} & \ldots & {{\overset{\sim}{w}}_{10,784}^{(1)} \cdot x_{784}^{(1)}} \end{bmatrix}},\mspace{20mu} {{{where}\mspace{20mu} {\overset{\sim}{W}}^{(l)}} = \begin{bmatrix} {\overset{\sim}{w}}_{1,1}^{(l)} & \ldots & {\overset{\sim}{w}}_{1,I}^{(l)} \\ \vdots & \ddots & \vdots \\ {\overset{\sim}{w}}_{j,1}^{(l)} & \ldots & {\overset{\sim}{w}}_{J,I}^{(l)} \end{bmatrix}},}}}$

and the operator ∘, with reference to

A∘B

where A is a matrix and B is a vector, indicates an operation for taking the product of the i-th column component of the matrix A and the i-th element of the vector B.

Next, as illustrated in FIG. 6, an M′×N=10×784 matrix

{tilde over (W)}^((l))

is divided at every 1/γ=50 columns into an M′×N′=10×50 matrix

{tilde over (W)}_(i) ^((l))

as follows:

$\begin{matrix} {\mspace{79mu} {{{{\overset{\sim}{W}}_{1}^{(l)} \circ x_{1}^{(l)}} = {\begin{bmatrix} {\overset{\sim}{w}}_{1,1}^{(l)} & \ldots & {\overset{\sim}{w}}_{1,50}^{(l)} \\ \vdots & \ddots & \vdots \\ {\overset{\sim}{w}}_{10,1}^{(l)} & \ldots & {\overset{\sim}{w}}_{10,50}^{(l)} \end{bmatrix} \circ \begin{bmatrix} x_{1}^{(l)} & \ldots & x_{50}^{(l)} \end{bmatrix}}},}} & (1) \\ {\mspace{79mu} {{{{\overset{\sim}{W}}_{2}^{(l)} \circ x_{2}^{(l)}} = {\begin{bmatrix} {\overset{\sim}{w}}_{1,51}^{(l)} & \ldots & {\overset{\sim}{w}}_{1,100}^{(l)} \\ \vdots & \ddots & \vdots \\ {\overset{\sim}{w}}_{10,51}^{(l)} & \ldots & {\overset{\sim}{w}}_{10,100}^{(l)} \end{bmatrix} \circ \begin{bmatrix} x_{51}^{(l)} & \ldots & x_{100}^{(l)} \end{bmatrix}}},}} & \; \\ {{{{\overset{\sim}{W}}_{i}^{(l)} \circ x_{i}^{(l)}} = {\begin{bmatrix} {\overset{\sim}{w}}_{1,{{{({i - 1})} \cdot N^{\prime}} + 1}}^{(l)} & \ldots & {\overset{\sim}{w}}_{1,{i \cdot N^{\prime}}}^{(l)} \\ \vdots & \ddots & \vdots \\ {\overset{\sim}{w}}_{M^{\prime},{{{({i - 1})} \cdot N^{\prime}} + 1}}^{(l)} & \ldots & {\overset{\sim}{w}}_{M^{\prime},{i \cdot N^{\prime}}}^{(l)} \end{bmatrix} \circ \begin{bmatrix} x_{{{({i - 1})} \cdot N^{\prime}} + 1}^{(l)} & \ldots & x_{i \cdot N^{\prime}}^{(l)} \end{bmatrix}}},} & \; \\ {{{\overset{\sim}{W}}_{\lceil{N \cdot \gamma}\rceil}^{(l)} \circ x_{\lceil{N \cdot \gamma}\rceil}^{(l)}} = {\begin{bmatrix} {\overset{\sim}{w}}_{1,{{{({{\lceil{N \cdot \gamma}\rceil} - 1})} \cdot N^{\prime}} + 1}}^{(l)} & \ldots & {\overset{\sim}{w}}_{1{{\lceil{N \cdot \gamma}\rceil} \cdot N^{\prime}}}^{(l)} \\ \vdots & \ddots & \vdots \\ {\overset{\sim}{w}}_{M^{\prime},{{{({{\lceil{N \cdot \gamma}\rceil} - 1})} \cdot N^{\prime}} + 1}}^{(l)} & \ldots & {\overset{\sim}{w}}_{M^{\prime},{{\lceil{N \cdot \gamma}\rceil} \cdot N^{\prime}}}^{(l)} \end{bmatrix} \circ {\quad\begin{bmatrix} x_{{{({{\lceil{N \cdot \gamma}\rceil} - 1})} \cdot N^{\prime}} + 1}^{(l)} & \ldots & x_{{\lceil{N \cdot \gamma}\rceil} \cdot N^{\prime}}^{(l)} \end{bmatrix}}}} & \; \end{matrix}$

In addition,

{tilde over (W)}₁ ^((l))∘x₁ ^((l))

and a matrix

{tilde over (W)}_(l) ^((l))∘x_(l) ^((l))

that has been obtained by permutation or random permutation with respect to the same according to a specific rule are summed as follows. Here, permutation means that an operation in which the locations of arbitrary two elements of the matrix are exchanged with each other is performed an arbitrary number of times.

{dot over (x)} ^((l+1)) ={tilde over (W)} ₁ ^((l)) ∘x ₁ ^((l))+{tilde over (W)}₂ ^((l)) ∘x ₂ ^((l)) + . . . +{tilde over (W)}_([N·γ]) ^((l)) ∘x _([N·γ]) ^((l))   (2)

As a result, an M′×N′=10×50 matrix is output, as indicated in the right-side end of FIG. 6.

This matrix

${\overset{.}{x}}^{({l + 1})} = \begin{bmatrix} x_{1,1}^{({l + 1})} & \ldots & x_{1,{1/\gamma}}^{({l + 1})} \\ \vdots & \ddots & \vdots \\ x_{{M \cdot \gamma},1}^{({l + 1})} & \ldots & x_{{M \cdot \gamma},{1/\gamma}}^{({l + 1})} \end{bmatrix}$

is transformed into a vector to construct

$x^{({l + 1})} = {\begin{bmatrix} x_{1,1}^{({l + 1})} & \ldots & x_{1,\frac{1}{\gamma}}^{({l + 1})} & x_{2,1}^{({l + 1})} & \ldots & x_{2,\frac{1}{\gamma}}^{({l + 1})} & \ldots & x_{{M \cdot \gamma},1}^{({l + 1})} & \ldots & x_{{M \cdot \gamma},\frac{1}{\gamma}}^{({l + 1})} \end{bmatrix}.}$

In the above example, x⁽²⁾ of a vector length 500 is generated from the 10×50 matrix x⁽²⁾.

Thus, it is possible to perform computation to output the signal of an intermediate node of 500 dimensions from the input signal of the same 784 dimensions as in the computation using the 500×784 weighting matrix W⁽¹⁾. Particularly, using the sum of matrices based on the combination of the permutated matrix

{tilde over (W)}_(l) ^((l))∘x_(l) ^((l)) ,

it is possible to achieve characteristics close to a random matrix.

Consequently, in terms of recognition performance and prediction performance, there is only a slight performance difference between the typical method and the method of the present invention.

Meanwhile, according to the present embodiment, the number of times of multiplication involving a large amount of computation is M′×N=10×784=7840 times, indicating the effect of reduction to γ=1/50 compared to the typical example of M×N=500×784=392000 times.

For example, the original weighting matrix W⁽¹⁾ is 6×9, the vector length of the input signal vector x⁽¹⁾ is 9, and the vector length of the output vector x⁽²⁾ is 6. For example, a computation

$x^{(2)} = {{W^{(1)} \cdot x^{(1)}} = {{\begin{bmatrix} w_{1,1} & \ldots & w_{1,9} \\ \vdots & \ddots & \vdots \\ w_{6,1} & \ldots & w_{6,9} \end{bmatrix} \cdot \begin{bmatrix} x_{1} \\ \vdots \\ x_{9} \end{bmatrix}} = {\quad\begin{bmatrix} {{w_{1,1} \cdot x_{1}} + {w_{1,2} \cdot x_{2}} + \ldots + {w_{1,9} \cdot x_{9}}} \\ {{w_{2,1} \cdot x_{1}} + {w_{2,2} \cdot x_{2}} + \ldots + {w_{2,9} \cdot x_{9}}} \\ \vdots \\ {{w_{6,1} \cdot x_{1}} + {w_{6,2} \cdot x_{2}} + \ldots + {w_{6,9} \cdot x_{9}}} \end{bmatrix}}}}$

is performed. Generally, the weight is set in a range of w_(i,j)∈[−1, 1]. Here, if the variance value of distribution of the weights is large, the weights tend to take values such as −1 and 1, which may cause the vanishing gradient problem in which learning fails to converge during the learning process.

For example, if all of the weights of the first row and the second row of the above expression become 1,

w _(1,1) ·x ₁ +w _(1,2) ·x ₂ + . . . +w _(1,9) ·x ₉ =x ₁ +x ₂ + . . . +x ₉   (3)

w _(2,1) ·x ₁ +w _(2,2) ·x ₂ + . . . +w _(2,9) ·x ₉ =x ₁ +x ₂ + . . . +x ₉   (4).

As will be seen from the right side of the above expression, two identical equations would exist in an overlapping manner, so that the first element and the second element of x⁽²⁾ that is output become the same, which means that one of the elements has been lost, resulting in a loss in the information of x⁽²⁾ per se. That is, while x⁽²⁾ originally has six elements, as the first element and the second element become the same, the information is reduced to that of five elements. A loss in the information in one layer for which the computation is performed leads to a loss in the information used for final identification, and therefore causes a decrease in identification performance. Meanwhile, if the weight w_(i,j) had values such as −1 and 1, a loss in the elements of x⁽²⁾ can still be prevented as long as a method is used that makes it possible to avoid the generation of the same equations from the beginning, providing the effect that the amount of information required for identification can be maintained and the accuracy of final identification is not lowered.

From this viewpoint, according to the technique adopted in the present invention, instead of taking the sum of the products of the components of each row of the weighting matrix W^((l)) and all of the elements of the vector x^((l)), a means is taken whereby the sum of the products of some of the elements is taken and a combination rule is made such that the equations do not overlap, thereby avoiding the generation of the identical equations. Initially, a weighting matrix

{tilde over (W)}^((l))

is made in which the number of rows has been compressed along the compression ratio, W^((l)) is divided at every inverse 1/γ of the compression ratio to compute

${\overset{˜}{W}}_{i}^{(l)} \circ x_{i}^{(l)}$

as according to expression (1), and then, with respect to

${{\overset{˜}{W}}_{i}^{(l)} \circ x_{i}^{(l)}},$

permutation or random permutation is performed according to a specific rule to obtain a matrix

$\overset{\_}{{\overset{˜}{W}}_{i}^{(l)} \circ x_{i}^{(l)}},$

and the matrices are summed as according to expression (2). These implementations may be performed using software, or hardware such as an FPGA.

As a concrete example, a case where γ=⅓ will be described. First, the number of rows is made from 6 to the number of rows 6×γ=2 rows after compression. Then, the number of columns is divided at every 1/γ=3 columns, constructing 2×3 weighting matrices

{tilde over (W)}₁ ⁽¹⁾, {tilde over (W)}₂ ⁽¹⁾, {tilde over (W)}₃ ⁽¹⁾.

The vector length is computed using x₁ ⁽¹⁾, x₂ ⁽¹⁾, and x₃ ⁽¹⁾ of 1/γ=3, as follows:

${{\overset{\sim}{W}}_{1}^{(1)} \circ x_{1}^{(1)}} = {{\begin{bmatrix} w_{1,1} & w_{1,2} & w_{1,3} \\ w_{2,1} & w_{2,2} & w_{2,3} \end{bmatrix} \circ \begin{bmatrix} x_{1} & x_{2} & x_{3} \end{bmatrix}} = {\quad{{\begin{bmatrix} {w_{1,1} \cdot x_{1}} & {w_{1,2} \cdot x_{2}} & {w_{1,3} \cdot x_{3}} \\ {w_{2,1} \cdot x_{1}} & {w_{2,2} \cdot x_{2}} & {w_{2,3} \cdot x_{3}} \end{bmatrix}{{\overset{\sim}{W}}_{2}^{(1)} \circ x_{2}^{(1)}}} = {{\begin{bmatrix} w_{1,4} & w_{1,5} & w_{1,6} \\ w_{2,4} & w_{2,5} & w_{2,6} \end{bmatrix} \circ \begin{bmatrix} x_{4} & x_{5} & x_{6} \end{bmatrix}} = {\quad{{\begin{bmatrix} {w_{1,4} \cdot x_{4}} & {w_{1,5} \cdot x_{5}} & {w_{1,6} \cdot x_{6}} \\ {w_{2,4} \cdot x_{4}} & {w_{2,5} \cdot x_{5}} & {w_{2,6} \cdot x_{6}} \end{bmatrix}{{\overset{\sim}{W}}_{3}^{(1)} \circ x_{3}^{(1)}}} = {{\begin{bmatrix} w_{1,7} & w_{1,8} & w_{1,9} \\ w_{2,7} & w_{2,8} & w_{2,9} \end{bmatrix} \circ \begin{bmatrix} x_{7} & x_{8} & x_{9} \end{bmatrix}} = {\quad{\begin{bmatrix} {w_{1,7} \cdot x_{7}} & {w_{1,8} \cdot x_{8}} & {w_{1,9} \cdot x_{9}} \\ {w_{2,7} \cdot x_{7}} & {w_{2,8} \cdot x_{8}} & {w_{2,9} \cdot x_{9}} \end{bmatrix}.}}}}}}}}}$

Note that for simplicity, the representation of the superscript (1) of the ma components and the vector elements is omitted.

Here, permutation is performed whereby the second row of

{tilde over (W)}₂ ⁽¹⁾∘x₂ ⁽¹⁾

is cyclically shifted to the left by one column, as follows:

$\overset{\_}{{\overset{\sim}{W}}_{2}^{(1)} \circ x_{2}^{(1)}}$ $\overset{\_}{{\overset{\sim}{W}}_{2}^{(1)} \circ x_{2}^{(1)}} = {\quad{\begin{bmatrix} {w_{1,4} \cdot x_{4}} & {w_{1,5} \cdot x_{5}} & {w_{1,6} \cdot x_{6}} \\ {w_{2,5} \cdot x_{5}} & {w_{2,6} \cdot x_{6}} & {w_{2,4} \cdot x_{4}} \end{bmatrix}.}}$

Also, permutation is performed whereby the second row of

{tilde over (W)}₃ ⁽¹⁾∘x₃ ⁽¹⁾

is cyclically shifted to the left by two columns, as follows:

$\overset{\_}{{\overset{\sim}{W}}_{3}^{(1)} \circ x_{3}^{(1)}}$ $\overset{\_}{{\overset{\sim}{W}}_{3}^{(1)} \circ x_{3}^{(1)}} = {\quad{\begin{bmatrix} {w_{1,7} \cdot x_{7}} & {w_{1,8} \cdot x_{8}} & {w_{1,9} \cdot x_{9}} \\ {w_{2,9} \cdot x_{9}} & {w_{2,7} \cdot x_{7}} & {w_{2,8} \cdot x_{8}} \end{bmatrix}.}}$

Accordingly,

{dot over (x)}⁽²⁾

is computed as follows:

$\begin{matrix} {{\overset{.}{x}}^{(2)} = {{{{\overset{\sim}{W}}_{1}^{(1)} \circ x_{1}^{(1)}} + \overset{\_}{{\overset{\sim}{W}}_{2}^{(1)} \circ x_{2}^{(1)}} + \overset{\_}{{\overset{\sim}{W}}_{3}^{(1)} \circ x_{3}^{(1)}}} = {\begin{bmatrix} {{w_{1,1} \cdot x_{1}} + {w_{1,4} \cdot x_{4}} + {w_{1,7} \cdot x_{7}}} & {{w_{1,2} \cdot x_{2}} + {w_{1,5} \cdot x_{5}} + {w_{1,8} \cdot x_{8}}} & {{w_{1,3} \cdot x_{3}} + {w_{1,6} \cdot x_{6}} + {w_{1,9} \cdot x_{9}}} \\ {{w_{2,1} \cdot x_{1}} + {w_{2,5} \cdot x_{5}} + {w_{2,9} \cdot x_{9}}} & {{w_{2,2} \cdot x_{2}} + {w_{2,6} \cdot x_{6}} + {w_{2,7} \cdot x_{7}}} & {{w_{2,3} \cdot x_{3}} + {w_{2,4} \cdot x_{4}} + {w_{2,8} \cdot x_{8}}} \end{bmatrix}.}}} & (5) \end{matrix}$

For simplicity,

${\overset{.}{x}}^{(2)} = {\overset{.}{y} = {\begin{bmatrix} y_{1} & y_{2} & y_{3} \\ y_{4} & y_{5} & y_{6} \end{bmatrix}.}}$

With this procedure, it is possible to avoid the generation of the same equations from the beginning, even if the weight has taken values such as −1 and 1. For example, even if all of the weights w_(i,j) in the above example were 1, the result is y₁=x₁+x₄+x₇, y₂=x₂+x₅+x₈, y₃=x₃+x₆+x₉, y₄=x₁+x₅+x₉, y₅=x₂+x₆+x₇, y₆=x₃+x₄+x₈ and no overlapping equations are generated. In addition, the number of taking the sums of the products per equation is reduced from the 9 times for the product and the 8 times for the sum as according to expression (3) and expression (4), to 3 times for the product and twice for the sum, as indicated by expression (5).

This technique simply involves cyclically shifting the second row of the components of

${{\overset{\sim}{W}}_{2}^{(1)} \circ x_{2}^{(1)}} = {\quad\begin{bmatrix} {w_{1,4} \cdot x_{4}} & {w_{1,5} \cdot x_{5}} & {w_{1,6} \cdot x_{6}} \\ {w_{2,4} \cdot x_{4}} & {w_{2,5} \cdot x_{5}} & {w_{2,6} \cdot x_{6}} \end{bmatrix}}$

to the left by one column, and cyclically shifting the second row of the components of

${{\overset{\sim}{W}}_{3}^{(1)} \circ x_{3}^{(1)}} = {\quad\begin{bmatrix} {w_{1,7} \cdot x_{7}} & {w_{1,8} \cdot x_{8}} & {w_{1,9} \cdot x_{9}} \\ {w_{2,7} \cdot x_{7}} & {w_{2,8} \cdot x_{8}} & {w_{2,9} \cdot x_{9}} \end{bmatrix}}$

to the left by 2 columns. Even with such simple structure, it is possible to avoid the generation of the same equations.

FIG. 7 and FIG. 8 illustrate a summary of the above computation example and a specific circuit for hardware implementation of the computation. A hardware configuration for performing the 1-column cyclical shifting and the 2-column cyclical shifting of the matrix illustrated in FIG. 7 is achieved by the hardware illustrated in FIG. 8.

Referring to FIG. 8, the sign combining “∘” and “×” indicates a multiplication circuit, and the sign combining “∘” and “+” indicates an addition circuit. As will be seen from FIG. 8, once the value x⁽¹⁾ and the weight W⁽¹⁾ of the input vector are set in a register or the like, the sum of products can be taken simultaneously. It is also possible by compression to reduce the number of product-sum circuits and the number of memories necessary for the circuit in proportion to the compression ratio of the matrix components.

Also, by fixing the permutation pattern from

{tilde over (W)}_(i) ^((l))∘x_(i) ^((l))

to

{tilde over (W)}_(l) ^((l))∘x_(l) ^((l)) ,

it becomes possible to fix the connection pattern as illustrated in FIG. 8, and to facilitate hardware implementation.

FIG. 9 and FIG. 10 illustrate a case where random permutation is employed for the permutation pattern from

${\overset{˜}{W}}_{i}^{(l)} \circ x_{i}^{(l)}$ to $\overset{\_}{{\overset{˜}{W}}_{i}^{(l)} \circ x_{i}^{(l)}}.$

A hardware configuration for random permutation for both the first row and the second row of the matrix illustrated in FIG. 9 is achieved by the hardware illustrated in FIG. 10. In this case, too, the permutation pattern can be fixed, so that hardware implementation is likewise facilitated.

FIG. 11 compares a flowchart for performing the computation process of the present embodiment with that of a typical DNN. The steps S11 to S19 to the left in FIG. 11 relate to the flowchart for performing the typical DNN. The steps S21 to S31 to the right in FIG. 11 relate to the flowchart for performing the DNN of the present embodiment.

In the typical DNN, for input data such as image data, generally a combination of data of each pixel is handled as a vector, and the vector, as the input vector x⁽¹⁾, is subjected to preprocessing for normalization and quantization (step S11). Thereafter, as illustrated in FIG. 4, the matrix multiplication W⁽¹⁾x⁽¹⁾ is implemented using the weighting matrix W⁽¹⁾ of the initial layer l=1 and the vector x⁽¹⁾ (step S12), and then the activation function f is performed (step S13) to obtain the vector x⁽²⁾ of the node of the next layer l=2. This process is repeated (step S14 to S16) to e.g. the l=L layer (step S17 to S18), and finally computation such as Softmax is implemented to perform recognition computation (step S19). While in the example of FIG. 11, a method has been described where a non-compressed matrix is used for the l=L layer, computation using the compressed matrix of the present invention for the l=L layer may be performed. Furthermore, the computation according to the inventive method may be applied to only some of all the layers.

Next, the process for performing the DNN according to the present embodiment illustrated on the right in FIG. 11 will be described.

First, as in the typical example, the input signal is subjected to preprocessing (step S21). Thereafter, as described as matrix computation, the compressed weighting matrix

{tilde over (W)}⁽¹⁾

is used to perform computation of

{tilde over (W)}⁽¹⁾∘x⁽¹⁾

(step S22), and further computation of

{tilde over (W)} ₁ ⁽¹⁾ ∘x ₁ ⁽¹⁾+ {tilde over (W)} ₂ ⁽¹⁾ ∘x ₂ ⁽¹⁾ + . . . + {tilde over (W)} _([N·γ]) ⁽¹⁾ ∘x _([N·γ]) ⁽¹⁾

is performed (step S23).

Thereafter, the activation function f is performed (step S24). The process from the preprocessing to the performing of the activation function is repeated (step S25 to S28) with respect to the next intermediate node, such as to the l=L (step S29 to S30), and finally computation such as Softmax is implemented to perform recognition computation (step S31). Note that while in FIG. 11, a method has been described where a non-compressed matrix is used for the l=L layer, computation using a compressed matrix also for the l=L layer may be performed.

Further, the computation process of the present embodiment may be applied to only some of all the layers.

Thus, the present embodiment can be applied as is to the typical matrix computation portion.

As described above, compression of the weighting matrix causes hardly any change in characteristics, and therefore the amount of computation can be reduced, The weighting matrix is also a representation of the network structure per se, and compression of the weighting matrix can be considered a network compression.

Table 1 and FIG. 12 illustrate evaluation results obtained when the DNN has been subjected to network compression. A structure in which the input dimension is 784 and the intermediate layer has 500 dimensions and which finally produces an output of recognition computation (Softmax) of 0 to 9 is adopted. As will be seen from the evaluation results in Table 1 and FIG. 12, the accuracy rate has deteriorated only slightly when the amount of computation has been reduced to 1/50. Table 1 shows the accuracy rate for recognizing handwritten numerals of 0 to 9.

TABLE 1 Compression ratio No compression γ = ⅓ γ = ⅙ γ = 1/12 γ = 1/25 γ = 1/50 Accuracy 98.4 98.3 98.0 97.8 97.7 97.8 rate (%)

Next, a second embodiment of the present invention will be described with reference to FIG. 13 to FIG. 18. The second embodiment is an example applied to a convolutional neural network (CNN).

FIG. 13 illustrates a basic network configuration of the CNN. Generally, CNNs are used for the purpose of recognizing objects captured in an image and the like, for example. Accordingly, the following description contemplates identification of objects in an image.

First, let the input data size of the l-th layer be M⁽¹⁾×M⁽¹⁾, and the total number of input channels be CN⁽¹⁾. Also, the size of output data of the l-th layer is the same as the input data size M^((l+1))×M^((1+l)) of the l+1 layer, and the total number of output channels of the l-th layer is the same as the total number CN^((l+1)) of input channels of the l+1 layer. Also, a region for convolution is referred to as a kernel or a filter. Let the size of the filter region be H^((l))×H^((l)), and let the matrix of the filter corresponding to the respective channels C(l), C(l+1) of the l-layer, l+1 layer be F^((l), C(l), C(l-1)). Let the input data corresponding to each C(l) be

${X^{{(l)},{C{(l)}}} = \begin{bmatrix} x_{1,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,M^{(l)}}^{{(l)},{C{(l)}}} \\ \vdots & \ddots & \vdots \\ x_{M^{(l)},1}^{{(l)},{C{(l)}}} & \ldots & x_{M^{(l)},M^{(l)}}^{{(l)},{C{(l)}}} \end{bmatrix}},$

and let the filter corresponding to the input channel C(l), output channel C(l+1) be

$F^{{(l)},{C{(l)}},{C{({l + 1})}}} = {\begin{bmatrix} f_{1,1}^{{(l)},{C{(l)}},{C{({l + 1})}}} & \ldots & f_{1,H^{(l)}}^{{(l)},{C{(l)}},{C{({l + 1})}}} \\ \vdots & \ddots & \vdots \\ f_{H^{(l)},1}^{{(l)},{C{(l)}},{C{({l + 1})}}} & \ldots & f_{H^{(l)},H^{(l)}}^{{(l)},{C{(l)}},{C{({l + 1})}}} \end{bmatrix}.}$

FIG. 14 illustrates an example. In a case of RGB image data, for example, a channel is required for each of R, G, and B, and the total number of the channels of the l=1st layer of the input is the CN^((l=1))=3. Also, when M⁽¹⁾=3, M⁽²⁾=3, CN⁽²⁾=2, and H⁽¹⁾=2,

${X^{{(1)},1} = \begin{bmatrix} x_{1,1}^{{(1)},1} & x_{1,2}^{{(1)},1} & x_{1,3}^{{(1)},1} \\ x_{2,1}^{{(1)},1} & x_{2,2}^{{(1)},1} & x_{2,3}^{{(1)},1} \\ x_{3,1}^{{(1)},1} & x_{3,2}^{{(1)},1} & x_{3,3}^{{(1)},1} \end{bmatrix}},{X^{{(1)},2} = \begin{bmatrix} x_{1,1}^{{(1)},2} & x_{1,2}^{{(1)},2} & x_{1,3}^{{(1)},2} \\ x_{2,1}^{{(1)},2} & x_{2,2}^{{(1)},2} & x_{2,3}^{{(1)},2} \\ x_{3,1}^{{(1)},2} & x_{3,2}^{{(1)},2} & x_{3,3}^{{(1)},2} \end{bmatrix}},{X^{{(1)},3} = \begin{bmatrix} x_{1,1}^{{(1)},3} & x_{1,2}^{{(1)},3} & x_{1,3}^{{(1)},3} \\ x_{2,1}^{{(1)},3} & x_{2,2}^{{(1)},3} & x_{2,3}^{{(1)},3} \\ x_{3,1}^{{(1)},3} & x_{3,2}^{{(1)},3} & x_{3,3}^{{(1)},3} \end{bmatrix}},{F^{{(1)},1,1} = \begin{bmatrix} f_{1,1}^{{(1)},1,1} & f_{1,2}^{{(1)},1,1} \\ f_{2,1}^{{(1)},1,1} & f_{2,2}^{{(1)},1,1} \end{bmatrix}},{F^{{(1)},2,1} = \begin{bmatrix} f_{1,1}^{{(1)},2,1} & f_{1,2}^{{(1)},2,1} \\ f_{2,1}^{{(1)},2,1} & f_{2,2}^{{(1)},2,1} \end{bmatrix}},{F^{{(1)},3,1} = \begin{bmatrix} f_{1,1}^{{(1)},3,1} & f_{1,2}^{{(1)},3,1} \\ f_{2,1}^{{(1)},3,1} & f_{2,2}^{{(1)},3,1} \end{bmatrix}},{F^{{(1)},1,2} = \begin{bmatrix} f_{1,1}^{{(1)},1,2} & f_{1,2}^{{(1)},1,2} \\ f_{2,1}^{{(1)},1,2} & f_{2,2}^{{(1)},1,2} \end{bmatrix}},{F^{{(1)},2,2} = \begin{bmatrix} f_{1,1}^{{(1)},2,2} & f_{1,2}^{{(1)},2,2} \\ f_{2,1}^{{(1)},2,2} & f_{2,2}^{{(1)},2,2} \end{bmatrix}},{F^{{(1)},3,2} = \begin{bmatrix} f_{1,1}^{{(1)},3,2} & f_{1,2}^{{(1)},3,2} \\ f_{2,1}^{{(1)},3,2} & f_{2,2}^{{(1)},3,2} \end{bmatrix}},{X^{{(2)},1} = \begin{bmatrix} x_{1,1}^{{(2)},1} & x_{1,2}^{{(2)},1} & x_{1,3}^{{(2)},1} \\ x_{2,1}^{{(2)},1} & x_{2,2}^{{(2)},1} & x_{2,3}^{{(2)},1} \\ x_{3,1}^{{(2)},1} & x_{3,2}^{{(2)},1} & x_{3,3}^{{(2)},1} \end{bmatrix}},{X^{{(2)},2} = {\begin{bmatrix} x_{1,1}^{{(2)},2} & x_{1,2}^{{(2)},2} & x_{1,3}^{{(2)},2} \\ x_{2,1}^{{(2)},2} & x_{2,2}^{{(2)},2} & x_{2,3}^{{(2)},2} \\ x_{3,1}^{{(2)},2} & x_{3,2}^{{(2)},2} & x_{3,3}^{{(2)},2} \end{bmatrix}.}}$

When computation is performed along FIG. 14,

${X^{{(2)},1} = {\begin{bmatrix} x_{1,1}^{{(2)},1} & x_{1,2}^{{(2)},1} & x_{1,3}^{{(2)},1} \\ x_{2,1}^{{(2)},1} & x_{2,2}^{{(2)},1} & x_{2,3}^{{(2)},1} \\ x_{3,1}^{{(2)},1} & x_{3,2}^{{(2)},1} & x_{3,3}^{{(2)},1} \end{bmatrix} = \begin{bmatrix} {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{i,j}^{{(1)},k,1} \cdot x_{i,j}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{i,{j + 1}}^{{(1)},k,1} \cdot x_{i,{j + 1}}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{i,{j + 2}}^{{(1)},k,1} \cdot x_{i,{j + 2}}^{{(1)},k}}}}} \\ {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 1},j}^{{(1)},k,1} \cdot x_{{i + 1},j}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 1},{j + 1}}^{{(1)},k,1} \cdot x_{{i + 1},{j + 1}}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 1},{j + 2}}^{{(1)},k,1} \cdot x_{{i + 1},{j + 2}}^{{(1)},k}}}}} \\ {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 2},j}^{{(1)},k,1} \cdot x_{{i + 2},j}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 2},{j + 1}}^{{(1)},k,1} \cdot x_{{i + 2},{j + 1}}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 2},{j + 2}}^{{(1)},k,1} \cdot x_{{i + 2},{j + 2}}^{{(1)},k}}}}} \end{bmatrix}}},{X^{{(2)},2} = {\begin{bmatrix} x_{1,1}^{{(2)},2} & x_{1,2}^{{(2)},2} & x_{1,3}^{{(2)},2} \\ x_{2,1}^{{(2)},2} & x_{2,2}^{{(2)},2} & x_{2,3}^{{(2)},2} \\ x_{3,1}^{{(2)},2} & x_{3,2}^{{(2)},2} & x_{3,3}^{{(2)},2} \end{bmatrix} = {\begin{bmatrix} {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{i,j}^{{(1)},k,2} \cdot x_{i,j}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{i,{j + 1}}^{{(1)},k,2} \cdot x_{i,{j + 1}}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{i,{j + 2}}^{{(1)},k,2} \cdot x_{i,{j + 2}}^{{(1)},k}}}}} \\ {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 1},j}^{{(1)},k,2} \cdot x_{{i + 1},j}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 1},{j + 1}}^{{(1)},k,2} \cdot x_{{i + 1},{j + 1}}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 1},{j + 2}}^{{(1)},k,2} \cdot x_{{i + 1},{j + 2}}^{{(1)},k}}}}} \\ {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 2},j}^{{(1)},k,2} \cdot x_{{i + 2},j}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 2},{j + 1}}^{{(1)},k,2} \cdot x_{{i + 2},{j + 1}}^{{(1)},k}}}}} & {\sum\limits_{k = 1}^{{CN}^{(1)}}{\sum\limits_{i = 1}^{H^{(1)}}{\sum\limits_{j = 1}^{H^{(1)}}{f_{{i + 2},{j + 2}}^{{(1)},k,2} \cdot x_{{i + 2},{j + 2}}^{{(1)},k}}}}} \end{bmatrix}.}}}$

where, in

x_(i,j) ^((l),C(l)),

when i>M^((l)) or j>M^((l)),

x_(i,j) ^((l),C(l))=0.

As indicated above, performing computation of convolution in matrix form makes implementation complicated. Thus, for sake of computational efficiency, the matrix X^((l), C(l)) is transformed into a vector with a length M^((l))×M^((l)) to obtain x^((l), C(l)) as follows:

$x^{{(l)},{C{(l)}}} = {\begin{bmatrix} x_{1,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,M^{(l)}}^{{(l)},{C{(l)}}} & x_{2,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,M^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{M^{(l)},1}^{{(l)},{C{(l)}}} & \ldots & x_{M^{(l)},M^{(l)}}^{{(l)},{C{(l)}}} \end{bmatrix}.}$

Meanwhile, X^((l), C(l)) is transformed, in accordance with the size of output data, into a vector with a length M^((l+1))×M^((l+1)) for computation of convolution, obtaining x_(r) ^((l), C(l)) where r means a vector for the r-th computation of convolution. For example, the vector x_(r=1) ^((l), C(l)) generated initially for the r=1-th computation of convolution is

$x_{r = 1}^{{(l)},{C{(l)}}} = {\begin{bmatrix} x_{1,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,M^{({l + 1})}}^{{(l)},{C{(l)}}} & x_{2,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,M^{({l + 1})}}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},1}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},M^{({l + 1})}}^{{(l)},{C{(l)}}} \end{bmatrix}.}$

Thereafter, the vector x_(r=2) ^((l), C(l)) generated for the r=2-th computation of convolution is

$x_{r = 2}^{{(l)},{C{(l)}}} = {\begin{bmatrix} x_{1,2}^{{(l)},{C{(l)}}} & \ldots & x_{1,{1 + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & x_{2,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,{1 + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},1}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},{1 + M^{({l + 1})}}}^{{(l)},{C{(l)}}} \end{bmatrix}.}$

Through a similar procedure, the convolution-computation regions of the matrix X^((l), C(l)) are transformed into vectors successively so as to correspond to the computing order of the computation of convolution, and the vectors are linked in the row-direction to generate the matrix xb^((l), C(l)) of the size (H^((l))×H^((l)))×(M^((l+1))×M^((l+1))) for each channel C(l), as follows:

$\mspace{20mu} {{xb}^{{(l)},{C{(l)}}} = \begin{bmatrix} x_{1,1}^{{(l)},{C{(l)}}} & \ldots & x_{1,M^{({l + 1})}}^{{(l)},{C{(l)}}} & x_{2,1}^{{(l)},{C{(l)}}} & \ldots & x_{2,M^{({l + 1})}}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},1}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},M^{({l + 1})}}^{{(l)},{C{(l)}}} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots & \ddots & \vdots & \ddots & \vdots \\ x_{1,H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{1,{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & x_{2,H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{2,{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{M^{({l + 1})},{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} \\ x_{2,1}^{{(l)},{C{(l)}}} & \ldots & x_{2,M^{({l + 1})}}^{{(l)},{C{(l)}}} & x_{3,1}^{{(l)},{C{(l)}}} & \ldots & x_{3,M^{({l + 1})}}^{{(l)},{C{(l)}}} & \ldots & x_{{M^{({l + 1})} + 2},1}^{{(l)},{C{(l)}}} & \ldots & x_{{M^{({l + 1})} + 1},M^{({l + 1})}}^{{(l)},{C{(l)}}} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots & \ddots & \vdots & \ddots & \vdots \\ x_{2,H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{2,{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & x_{3,H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{1,{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & \ldots & x_{{M^{({l + 1})} + 1},H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{\text{?}}^{{(l)},{C{(l)}}} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots & \ddots & \vdots & \ddots & \vdots \\ x_{H^{(l)},1}^{{(l)},{C{(l)}}} & \ldots & x_{H^{(l)},M^{({l + 1})}}^{{(l)},{C{(l)}}} & x_{{H^{(l)} + 1},1}^{{(l)},{C{(l)}}} & \ldots & x_{{H^{(l)} + 1},M^{({l + 1})}}^{{(l)},{C{(l)}}} & \ldots & x_{\text{?}}^{{(l)},{C{(l)}}} & \ldots & x_{{H^{(l)} + M^{({l + 1})}},M^{({l + 1})}}^{{(l)},{C{(l)}}} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots & \ddots & {\vdots\vdots} & \ddots & \vdots \\ x_{H^{(l)},H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{\text{?}}^{{(l)},{C{(l)}}} & x_{{H^{(l)} + 1},H^{(l)}}^{{(l)},{C{(l)}}} & \ldots & x_{{H^{(l)} + 1},{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} & \ldots & x_{\text{?}}^{{(l)},{C{(l)}}} & \ldots & x_{{H^{(l)} + M^{({l + 1})}},{H^{(l)} + M^{({l + 1})}}}^{{(l)},{C{(l)}}} \end{bmatrix}}$ ?indicates text missing or illegible when filed

The matrices are linked in the row-direction for the number of channels CN^((l)) to generate xb^((l)), as follows:

${{xb}^{(l)} = \begin{bmatrix} \begin{matrix} {xb}^{{(l)},1} \\ {xb}^{{(l)},2} \\ \vdots \end{matrix} \\ {xb}^{{(l)},{CN}^{(l)}} \end{bmatrix}},$

where, in

x_(i,j) ^((l),C(l)),

when i>M^((l)) or j>M^((l))

x _(i,j) ^((l),C(l))=0.

Next, xb^((l)) is used and, so as to enable computation by multiplication of its vectors, F^((l), C(l), C(l+1)) is transformed into a vector f^((l), C(l), C(l+1)) of a length H^((l))×H^((l)), and a filter matrix FB^((l)) of a size CN^((l+1))×(H^((l))×H^((l))×CN^((l))) is generated so that the vector f^((l), C(l), C(l+1)) corresponds to the number of channels of CN^((l)) and CN^((l+1)) in order

${f^{{(l)},{C{(l)}},{C{({l + 1})}}} = \begin{bmatrix} x_{1,1}^{{(l)},{C{(l)}},{C{({l + 1})}}} & \ldots & x_{1,H^{(l)}}^{{(l)},{C{(l)}},{C{({l + 1})}}} & x_{2,1}^{{(l)},{C{(l)}},{C{({l + 1})}}} & \ldots & x_{2,H^{(l)}}^{{(l)},{C{(l)}},{C{({l + 1})}}} & \ldots & x_{H^{(l)},1}^{{(l)},{C{(l)}},{C{({l + 1})}}} & \ldots & x_{H^{(l)},H^{(l)}}^{{(l)},{C{(l)}},{C{({l + 1})}}} \end{bmatrix}},{{FB}^{(l)} = {\begin{bmatrix} f^{{(l)},1,1} & \ldots & f^{{(l)},{CN}^{(l)},1} \\ \vdots & \ddots & \vdots \\ f^{{(l)},1,{CN}^{({l + 1})}} & \ldots & f^{{(l)},{CN}^{({l + 1})},{CN}^{({l + 1})}} \end{bmatrix}.}}$

From the product of the filter matrix FB^((l)) and x^((l)) , xb^((l+1)) is computed as follows:

xb ^((l+1)) =FB ^((l)) ·xb ^((l))

Also, each row of xb^((l+1))may be regarded as x^((l+1), C(l+1)) as follows:

${xb}^{({l + 1})} = {\begin{bmatrix} x^{{({l + 1})},1} \\ \vdots \\ x^{{({l + 1})},{C{({l + 1})}}} \\ \vdots \\ x^{{({l + 1})},{{CN}{({/{+ 1}})}}} \end{bmatrix}.}$

Generally, in a convolutional layer of a CNN, computation is performed as described above. In the example of FIG. 14:

$\mspace{20mu} {{xb}^{(1)} = \begin{bmatrix} x_{1,1}^{{(3)},3} & x_{1,2}^{{(1)},1} & x_{1,3}^{{(1)},1} & x_{2,1}^{{(1)},1} & x_{2,2}^{{(3)},3} & x_{2,3}^{{(1)},1} & x_{2,1}^{{(1)},1} & x_{2,2}^{{(1)},1} & x_{3,3}^{{(1)},1} \\ x_{1,2}^{{(2)},1} & x_{1,3}^{{(1)},1} & 0 & x_{2,2}^{{(3)},1} & x_{2,3}^{{(1)},1} & 0 & x_{3,2}^{{(1)},1} & x_{3,3}^{{(1)},1} & 0 \\ x_{2,3}^{{(2)},2} & x_{2,2}^{{(1)},1} & x_{2,3}^{{(2)},2} & x_{3,1}^{{(3)},1} & x_{3,2}^{{(2)},1} & x_{3,3}^{{(1)},1} & 0 & 0 & 0 \\ x_{2,2}^{{(1)},2} & x_{2,3}^{{(1)},1} & 0 & x_{3,2}^{{(1)},1} & x_{3,3}^{{(1)},1} & 0 & 0 & 0 & 0 \\ x_{1,1}^{{(1)},2} & x_{1,2}^{{(1)},2} & x_{1,3}^{{(1)},2} & x_{2,1}^{{(1)},2} & x_{2,2}^{{(1)},2} & x_{2,3}^{{(1)},2} & x_{3,1}^{{(1)},2} & x_{2,2}^{{(1)},2} & x_{3,3}^{{(1)},2} \\ x_{1,2}^{{(1)},2} & x_{1,3}^{{(1)},2} & 0 & x_{2,2}^{{(1)},2} & x_{2,3}^{{(1)},2} & 0 & x_{3,2}^{{(1)},2} & x_{3,3}^{{(1)},2} & 0 \\ x_{2,1}^{{(1)},2} & x_{2,2}^{{(1)},2} & x_{2,3}^{{(1)},2} & x_{3,1}^{{(1)},2} & x_{3,2}^{{(1)},2} & x_{3,3}^{{(1)},2} & 0 & 0 & 0 \\ x_{2,2}^{{(1)},2} & x_{3,3}^{{(1)},2} & 0 & x_{3,2}^{{(1)},2} & x_{3,3}^{{(1)},2} & 0 & 0 & 0 & 0 \\ x_{1,1}^{{(1)},3} & x_{1,2}^{{(3)},3} & x_{1,3}^{{(1)},3} & x_{2,1}^{{(1)},3} & x_{2,2}^{{(1)},3} & x_{2,2}^{{(1)},3} & x_{3,3}^{{(1)},3} & x_{3,2}^{{(1)},2} & x_{3,3}^{{(1)},3} \\ x_{1,2}^{{(1)},3} & x_{3,3}^{{(1)},3} & 0 & x_{2,2}^{{(1)},3} & x_{2,3}^{{(1)},3} & 0 & x_{3,2}^{{(1)},3} & x_{3,3}^{{(1)},3} & 0 \\ x_{2,1}^{{(1)},3} & x_{2,2}^{{(1)},3} & x_{2,2}^{{(1)},3} & x_{3,1}^{{(1)},3} & x_{3,2}^{{(1)},3} & x_{3,3}^{{(1)},3} & 0 & 0 & 0 \\ x_{2,2}^{{(1)},3} & x_{2,3}^{{(1)},3} & 0 & x_{3,2}^{{(1)},3} & x_{3,3}^{{(1)},3} & 0 & 0 & 0 & 0 \end{bmatrix}}$ ${FB}^{(1)} = \begin{bmatrix} f_{1,1}^{{(1)},1,1} & f_{1,2}^{{(1)},1,2} & f_{2,1}^{{(1)},1,1} & f_{2,2}^{{(1)},1,1} & f_{1,2}^{{(3)},2,1} & f_{2,1}^{{(1)},2,1} & f_{2,2}^{{(1)},2,1} & f_{2,3}^{{(1)},2,1} & f_{1,1}^{{(1)},3,2} & f_{1,2}^{{(2)},3,2} & f_{2,1}^{{(1)},3,1} & f_{2,2}^{{(1)},3,1} \\ f_{1,1}^{{(1)},1,2} & f_{1,2}^{{(1)},1,2} & f_{2,3}^{{(1)},1,2} & f_{2,2}^{{(1)},1,2} & f_{1,2}^{{(1)},2,2} & f_{2,1}^{{(1)},2,2} & f_{2,2}^{{(1)},2,2} & f_{2,2}^{{(1)},2,2} & f_{3,3}^{{(1)},2,2} & f_{1,2}^{{(1)},3,2} & f_{2,1}^{{(1)},3,2} & f_{2,2}^{{(1)},3,2} \end{bmatrix}$

From this,

xb ⁽²⁾ =FB ⁽¹⁾ ·xb ⁽¹⁾.

is computed.

Next, network compression will be described. FIG. 15 illustrates FB^((l)) in a case where, for example, H(1)=2, CN(1)=3, and CN(2)=4.

It is noted that of the superscript suffix of the elements of the matrix of FIG. 15, (l) indicating the layer is omitted for simplification.

The network compression method of the present embodiment with respect to the CNN is applied to the FB^((l)) for compression. The compressed filter matrix is

^((l))

For example, FIG. 16 illustrates an example where the compression ratio γ=½. As in the case of the CNN, the number of times of multiplication can be reduced to=½. In the typical CNN, in order to subject the convolutional layer, which is a part thereof, to the computation as described in FIG. 14, computation indicated as a typical example of FIG. 17(a) has been necessary.

That is, it has been necessary to take the product for CN^((l+1))-CN^((l))·H^((l))·M^((l+1))·M^((l+1)) times, the number of times of taking the product causing an increase in the amount of computation. In the present embodiment, as illustrated in FIG. 16(b), the original CN^((l+1))×(CN^((l))·H^((l))·H^((l))) matrix is compressed to (CN^((l+1))·γ)×(CN^((l))·H^((l))·H^((l))) to the compression ratio indicated by γ.

In the illustrated example, the compression ratio is γ=½ by way of example due to space limitations. However, as in the case of the DNN, it is also possible to set a higher compression ratio compression ratio, such as a few tenths.

This matrix

^((l))

is used to perform the following computation. First,

^((l))

is defined as follows:

( i ) = [ f ( l ) , 1 , 1 … f ( l ) , CN ( l ) , 1 ⋮ ⋱ ⋮ f ( l ) , 1 , γ · CN ( l + 1 ) … f ( l ) , CN ( l ) , γ · CN ( l + 1 ) ] ( 6 )

Moreover, when the i-th column partial matrix of xb^((l)) is xb_(i) ^((l)), the following computation is performed with respect to i=1, 2, . . . , M^((l+1))·M^((l+1)).

_(l) ^((l))=

^((l)) ∘xb _(i) ^((l))   (7)

In the example of FIG. 17(b), since (M^((l+1))·M^((l+1))=9, the computation is performed 9 times.

Next, as illustrated in FIG. 17(b), the (CN^((l+1))·γ)×(CN^((l))·H^((l))·H^((l))) matrix

i ( l ) = [ a i , 1 , 1 ( l ) … a i , 1 , CN ( l ) · H ( l ) · H ( l ) ( l ) ⋮ ⋱ ⋮ a i , CN ( l + 1 ) · γ , 1 ( l ) … a i , CN ( l + 1 ) · γ , CN ( l ) · H ( l ) · H ( l ) ( l ) ]

is divided into a (CN^((l+1))·γ)×1/γ matrix

_(i) ^((l),j)

at every 1/γ=2 columns, as follows:

 i ( l ) , 1 = [ a i , 1 , 1 ( l ) a i , 1 , 2 ( l ) a i , 2 , 1 ( l ) a i , 2 , 2 ( l ) ]   , i ( l ) , 2 = [ a i , 1 , 3 ( l ) a i , 1 , 4 ( l ) a i , 2 , 3 ( l ) a i , 2 , 4 ( l ) ]   , …   , i ( l ) , j = [ a i , 1 , 2  ( f - 1 ) + 1 ( l ) a i , 1 , 2  ( j - 1 ) + 2 ( l ) a i , 2 , 2  ( j - 1 ) + 1 ( l ) a i , 2 , 2  ( j - 1 ) + 1 ( l ) ]   , …  , i ( l ) , ⌈ CN ( l ) · H ( l ) · H ( l ) · γ ⌉ = [ a i , 1 , 2  ( ⌈ CN ( i ) · H ( l ) · H ( l ) · γ ⌉ - 1 ) + 1 ( l ) a i , 1 , 2  ( ⌈ CN ( l ) · H ( l ) · H ( l ) · γ ⌉ - 1 ) + 2 ( l ) a i , 2 , 2  ( ⌈ CN ( i ) · H ( l ) · H ( l ) · γ ⌉ - 1 ) + 1 ( l ) a i , 2 , 2  ( ⌈ CN ( l ) · H ( l ) · H ( l ) · γ ⌉ - 1 ) + 1 ( l ) ]

In addition,

_(i) ^((l),1)

is subjected to permutation of components according to a different rule to obtain a matrix

,

and the matrices are summed as follows:

x{dot over (b)} _(i) ^((l+1))=

_(i) ^((l),1)+

+ . . . +

  (8)

As a result, of

${\left( {{CN}^{({l + 1})} \cdot \gamma} \right) \times \frac{1}{\gamma}} = {2 \times 2}$

indicated at the bottom of FIG. 17, M^((l))·M^((l))=9 of the matrix

${\overset{.}{xb}}_{i}^{({l + 1})}$

are output so as to correspond to i=1, 2, . . . , M^((l+1))·M^((l+1)). The matrix

${x\; b_{l}^{({l + 1})}} = \begin{bmatrix} b_{i,1,1}^{({l + 1})} & \ldots & b_{i,1,{1/\gamma}}^{({l + 1})} \\ \vdots & \ddots & \vdots \\ b_{i,{{CN}^{({l + 1})} \cdot \gamma},1}^{({l + 1})} & \ldots & b_{i,{{CN}^{({l + 1})} \cdot \gamma},{1/\gamma}}^{({l + 1})} \end{bmatrix}$

is transformed into a vector, in which each row is linked in the column direction as shown below, and transposed to construct

${xb}_{i}^{({l + 1})} = {\begin{bmatrix} b_{i,1,1}^{({l + 1})} & \ldots & b_{i,1,{1/\gamma}}^{({l + 1})} & b_{i,2,1}^{({l + 1})} & \ldots & b_{i,2,{1/\gamma}}^{({l + 1})} & \ldots & b_{i,{{CN}^{({l + 1})} \cdot \gamma},1}^{({l + 1})} & \ldots & b_{i,{{CN}^{({l + 1})} \cdot \gamma},{1/\gamma}}^{({l + 1})} \end{bmatrix}^{T}.}$

These are used to determine xb^((l+1)) of CN^((l+1))×(M^((l+1))·M^((l+1))).

${xb}^{({l + 1})} = \begin{bmatrix} \left. {xb}_{1}^{({l + 1})} \right| & \left. {xb}_{2}^{({l + 1})} \right| & \left. \ldots \right| & {xb}_{M^{({l + 1})} \cdot M^{({l + 1})}}^{({l + 1})} \end{bmatrix}$

In the above example, of

${{\left( {{CN}^{(2)} \cdot \gamma} \right) \times \frac{1}{\gamma}} = {2 \times 2}},$

from the matrix

${\overset{.}{xb}}_{i}^{(2)},{xb}_{i}^{(2)}$

of

CN ⁽²⁾×1=4×1

is generated.

Finally, the output matrix xb^((l+1=2)) of CN^((l))×(M^((l+1))·M^((l+1)))=4×9 is obtained, and it is possible to perform computation of the output matrix xb^((l+1=2)) of the same number of nodes as before. Particularly, by using the sum of matrices based on a combination of the permutated matrix

,

it is possible to achieve characteristics close to a random matrix.

In terms of result recognition performance and prediction performance, there is only a slight performance difference between the typical example and the present embodiment. On the other hand, in the case of the present embodiment, it is possible to obtain the effect that the number of times of multiplication involving a large amount of computation can be lowered to the compression ratio γ, as in the case of the DNN. These may be implemented using software, or hardware such as an FPGA.

Next, an implementation example will be described. For example, with an originally 6×9 matrix FB^((l)), an input signal vector

xb₁ ⁽¹⁾

with a vector length 9 is compressed. When γ=¼, using a 2×9 matrix

⁽¹⁾

xb₁ ⁽¹⁾

of a vector length 9, and a 2×9 matrix

1 ( 1 ) ,  1 ( i ) =  ( s )  •  xb 1 ( 1 ) =  [ w 3 , 1 w 1 , 2 w 1 , 2 w 1 , 5 w 1 , 5 w 1 , 6 w 1 , 7 w 1 , 8 w 1 , 9 w 2 , 1 w 2 , 2 w 2 , 3 w 2 , 5 w 2 , 5 w 2 , 6 w 2 , 7 w 2 , 8 w 2 , 9 ] ∘  [ x 1   x 2   x 3   x 4   x 5   x 6   x 7   x 8   x 9 ] =  [ w 1 , 1 · x 1 w 1 , 2 · x 2 w 3 , 3 · x 3 w 1 , 4 · x 4 w 1 , 5 · x 5 w 1 , 6 · x 6 w 1 , 7 · x 7 w 1 , 8 · x 8 w 1 , 9 · x 9 w 2 , 3 · x 3 w 3 , 2 · x 2 w 2 , 4 · x 4 w 2 , 4 · x 4 w 2 , 5 · x 5 w 2 , 6 · x 6 w 2 , 7 · x 7 w 2 , 8 · x 8 w 2 , 9 · x 9 ] ( 9 )

It is noted that, for simplicity, of the matrix

⁽¹⁾

the components are designated w_(i,j), and of the vector

x₁ ⁽¹⁾

the elements are designated x_(j).

Herein,

1 ( 1 ) , 1 = [ w 1 , 1 · x 1 w 1 , 2 · x 2 w 1 , 3 · x 3 w 2 , 1 · x 1 w 2 , 2 · x 2 w 2 , 3 · x 3 ] 1 ( 1 ) , 2 = [ w 1 , 4 · x 4 w 1 , 5 · x 5 w 1 , 6 · x 6 w 2 , 4 · x 4 w 2 , 5 · x 5 w 2 , 6 · x 6 ] 1 ( 1 ) , 3 = [ w 1 , 7 · x 7 w 1 , 8 · x 8 w 1 , 9 · x 9 w 2 , 7 · x 7 w 2 , 8 · x 8 w 2 , 9 · x 9 ] .

Here, of

₁ ^((1),2)

the second row is permutated as follows:

${.} = \begin{bmatrix} {w_{1,4} \cdot x_{4}} & {w_{1,5} \cdot x_{5}} & {w_{1,6} \cdot x_{6}} \\ {w_{2,5} \cdot x_{5}} & {w_{2,6} \cdot x_{6}} & {w_{2,4} \cdot x_{4}} \end{bmatrix}$

Also, of

₁ ^((1),3)

the second row is shifted to the left by 2. columns by permutation, as follows:

${.} = \begin{bmatrix} {w_{1,7} \cdot x_{7}} & {w_{1,8} \cdot x_{8}} & {w_{1,9} \cdot x_{9}} \\ {w_{2,9} \cdot x_{9}} & {w_{2,7} \cdot x_{7}} & {w_{2,8} \cdot x_{8}} \end{bmatrix}$

As a result,

x{dot over (b)}₁ ⁽²⁾

is computed as follows:

xb 1 ( 2 ) =  1 ( 1 ) , 2 + + =  [ w 1 , 2 · x 2 + w 1 , 4 · x 4 + w 1 , 7 · x 7 w 2 , 3 · x 3 + w 2 , 5 · x 5 + w 2 , 5 · x 9  w 1 , 2 · x 2 + w 1 , 5 · x 5 + w 1 , 8 · x 8 w 1 , 3 · x 3 + w 1 , 6 · x 6 + w 1 , 5 · x 9 w 2 , 2 · x 2 + w 2 , 6 · x 6 + w 2 , 7 · x 7 w 2 , 1 · x 3 + w 3 , 4 · x 6 + w 2 , 8 · x 8 ] . ( 10 )

Note that, for simplicity,

${x\; {\overset{.}{b}}_{1}^{(2)}} = {\overset{.}{y} = {\begin{bmatrix} y_{1} & y_{2} & y_{3} \\ y_{4} & y_{5} & y_{6} \end{bmatrix}.}}$

This computing circuit is similar to the circuit for hardware implementation illustrated in FIG. 8.

When, for a permutation pattern from

_(i) ^((l),k)

to

,

random permutation is used, the circuit becomes similar to that of FIG. 10.

Note that in the present embodiment, during the computation of

x{dot over (b)} _(i) ^((l+1))=

_(i) ^((l),1)+

+ . . . +

the method has been described where

_(i) ^((l),1)

is not permutated. However, this portion may be permutated.

FIG. 18 compares a flowchart for performing the computation process of the present embodiment with that of the typical CNN. The steps S41 to S51 on the left of FIG. 18 relate to the flowchart for performing the typical CNN. The steps S61 to S73 on the right of FIG. 18 relate to the flowchart for performing the CNN of the present embodiment. The process of the present embodiment can be applied to the typical matrix computation portion.

Note that in the flowcharts of FIG. 18, Max Pooling is a function for extracting only the value that takes a maximum value in combinations of regions with a filter output. However, the typical system may be used for a part of matrix computation or the like that is used immediately before recognition computation (Softmax) for recognition.

First, the typical CNN execution process will be described. An input signal such as image data is generally handled as a vector of a combination of signals for each pixel.

Then, an input vector x⁽¹⁾ is transformed into a matrix xb⁽¹⁾ in accordance with a convolution rule, and preprocessing for normalization or quantization is performed (step S41).

Thereafter, as described with reference to FIG. 17(a), using the filter FB⁽¹⁾ for the initial layer l=1 and xb⁽¹⁾, matrix multiplication of FB⁽¹⁾ and xb⁽¹⁾ is implemented (step S42). Then, the activation function f is performed (step S43), processing such as MAX pooling is performed (step S44), and the vector x⁽²⁾ for the node of the next layer l=2 is obtained to configure xb⁽²⁾.

This process is repeatedly performed (step S45 to S50).

In the example of FIG. 18, the process is repeated to the l=L layer, and finally computation such as Softmax is implemented for recognition (step S51).

Next, an example (on the right of FIG. 18) of application to the CNN that is the process of the present embodiment will be described.

First, preprocessing of the input signal is performed as in the typical example (step S61).

Then, the filter matrix

^((l))

that has been compressed as described with reference to the matrix computation is used to implement computation of

^((l))∘xb_(i) ^((l))

(step S62), and thereafter,

x{dot over (b)}_(i) ^((l+1))

and

xb^((l+1))

are performed (step S63). Further, the activation function f is performed (step S64).

Next, a process such as MAX pooling is performed (step S65).

Then, similar computation is performed (step S66 to S70) including the implementation of preprocessing and the activation function, for example, to the l=L−1 layer, and computation is performed (step S71 to S72) using a non-compressed matrix only for the l=L layer.

Then, computation such as Softmax is implemented for recognition (step S73).

In the example of FIG. 18, the method has been described where a non-compressed matrix is used for the l=L layer. However, the computation may be performed using a compressed matrix also for the l=L layer.

Furthermore, the computation of the present embodiment may be applied to only some of all the layers.

As described above, even when the weighting matrix is compressed, there is hardly any change in characteristics, and therefore the amount of computation can be reduced. The filter matrix is a representation of a part of a network structure, and compression of the filter matrix can be considered a network compression.

In the first embodiment and the second embodiment described above, network compression methods with respect to a DNN and a CNN have been described. In addition to the techniques of the embodiments, further compression may be performed.

Next, a technique for performing further compression in addition to the techniques of the first embodiment and the second embodiment will be described. Here, a description will be given based on the second embodiment.

In the second embodiment, the method has been described wherein the 4×12 matrix FB^((l)) with CN^((l))·H^((l))·H^((l))=3·2·2=12 and CN^((l×1))=4 is compressed at the compression ratio γ=½ into the 2×12 matrix

^((l))

Here, a description will be given using a greater matrix FB^((l)). Let CN^((l))·H^((l))·H^((l))=64·3·3=576, and CN^((l+1))=192. Now, the matrix compression ratio is γ= 1/16, the inside of the compressed matrix is turned into partial matrices, creating a matrix characterized in that the partial matrices are configured with their columns or rows partially overlapping. A concrete example is illustrated in FIG. 19. In the compressed 12×576 matrix

^((l))

a 4×(16·1) partial matrix is arranged in the upper left, a 4×(16·13) partial matrix is arranged at the center, and a 4×(16·13) partial matrix is arranged in the lower tight. Here, the partial matrices do not have overlapping rows, but have overlapping columns.

In the present example, there is an overlap of 1/γ=16 columns between the partial matrices. Computation of each of the partial matrices is in accordance with expressions (6), (7), (8), (9), and (10). By this technique, the amount of computation is further reduced such that

${{\gamma \cdot \frac{{4 \cdot 192} + {4 \cdot 208} + {4 \cdot 208}}{12 \cdot 576}} = 0.021991},$

or to approximately 1/50. In this structure, it is also possible to avoid the generation of the same equations even if the weights have values such as −1 and 1 daring computation according to expression (9). Accordingly, effects similar to those of the first embodiment or the second embodiment can be expected. This computation process may be implemented using the circuit configurations illustrated in FIG. 8 and FIG. 10 for each partial matrix.

Thus, with the network compression method of the present invention, it is possible, whether in a DNN or a CNN, to reduce the amount of computation greatly in accordance with the compression ratio γ and the creation of a partial matrix, and, even when compressed as shown in Table 1, substantially equivalent accuracy rates can be achieved. Accordingly, it is possible to obtain the effect that lower-priced and lower power-consumption CPUs, general-purpose FPGAs and the like can be used for implementation.

Also, in the present implementation example, the generation of the same equations is avoided by adopting a means for making a combination rule such that, when determining x^((l+1)), in the weighting matrix W^((l)) and the vector x^((l)), instead of taking the sum of the products of the components of each row of the weighting matrix W^((l)) and all of the elements of the vector x^((l)), the sum of the products of some of the elements is taken so that the equations do not correspond. Thus, the inventive method is applicable as long as it is possible to perform computation for generating the combination avoiding corresponding equations.

Here, FIG. 20 illustrates an example of a hardware configuration of a computer device which is an information processing device for performing the computation process according to each embodiment of the present invention.

The computer device C illustrated in FIG. 20 has a bus C8 to which a central processing unit (CPU) C1, a read only memory (ROM) C2, and a random access memory (RAM) C3 are connected. Further, the computer device C further includes a nonvolatile storage C4 a network interface C5, an input device C6, and a display device C7. Also, a field-programmable gate array (FPGA) C9 may also be provided as needed.

The CPU C1 reads, from the ROM C2, a program code of software for achieving the functions of the information processing system device of the present example, and performs the program code. Variables, parameters, and the like generated during a computation process are temporarily written to the RAM C3. For example, the CPU C1 reads a program stored in the ROM C2, whereby the computation processes for the DNN or CNN that have been described are performed. It is also possible to implement some or all of the DNN or CNN in the FPGA C9 to implement the computation processes. When the FPGA is used, the effect of a decrease in power consumption and high-speed computation can be achieved.

The nonvolatile storage C4 includes a hard disk drive (HDD), a solid state drive (SSD), and the like. In the nonvolatile storage C4, an operating system (OS), various parameters, programs for performing a DNN or a CNN, and the like are recorded.

The network interface C5 may be used for the input/output of various data via a terminal-connected local area network (LAN), a dedicated line, and the like. For example, the network interface C5 receives an input signal for performing computation for the DNN or CNN. Also, the results of computation in the DNN or CNN are transmitted to an external terminal device via the network interface C5.

The input device C6 is configured from a keyboard and the like.

The display device C7 displays computation results and the like.

In the foregoing embodiments, the examples of a DNN and a CNN have been described. However, the present invention is applicable to any system which dimensional compression or compression sensing of input data is performed by artificial intelligence or machine learning having a network structure in a part thereof, such as general neural networks or current neural networks (RNN), or by matrix computation.

DESCRIPTION OF REFERENCE SIGNS

-   C Computer device -   C1 CPU -   C2 ROM -   C3 RAM -   C4 Nonvolatile storage -   C5 Network interface -   C6 input device -   C7 Display device -   C8 Bus -   C9 FPGA 

1. An information processing device comprising a computation processing unit for achieving an artificial intelligence function by performing computation of a neural network with respect to input data, wherein the computation processing unit: makes a number of rows or a number of columns of a weighting matrix for computing a network connecting nodes in the neural network a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data; and takes a sum of products of a weight component of the reduced number of rows or number of columns and some of elements of a vector of the input data, and configures equations all having different combinations.
 2. An information processing device comprising a computation processing unit for achieving an artificial intelligence function by performing computation of a neural network with respect to input data, wherein the computation processing unit: makes a number of rows or a number of columns of a weighting matrix for computing a network connecting nodes in the neural network a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data; and multiplies a weight component of the reduced number of rows or number of columns with a vector of the input data, divides a matrix of a result of the multiplication into a partial matrix for every certain number of columns or number of rows, and takes a sum of matrices for every partial matrix obtained by the dividing.
 3. The information processing device according to claim 2, herein an arbitrary permutation operation is added to every partial matrix.
 4. An information processing method, wherein an information processing device comprises a computation processing unit for achieving an artificial intelligence function by performing computation of a neural network with respect to input data, and wherein the computation processing unit: makes a number of rows or a number of columns of a weighting matrix for computing a network connecting nodes in the neural network a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data; and takes a sum of products of a weight component of the reduced number of rows or number of columns and some of elements of a vector of the input data, and configures equations all having different combinations.
 5. An information processing method, wherein a computation processing method for achieving an artificial intelligence function by performing computation of a neural network with respect to input data comprises: a reducing step of making a number of rows or a number of columns of a weighting matrix for computing a network connecting nodes in the neural network a number of rows or a number of columns reduced from a number of rows or a number of columns determined by input data or output data; a multiplication step of multiplying a weight component of the number of rows or the number of columns reduced in the reducing step with a vector of the input data; a dividing step of dividing a matrix of a result obtained in the multiplication step into a partial matrix for every certain number of columns or number of rows; and a sum-computing step of taking a sum of matrices for every partial matrix obtained by the dividing in the dividing step.
 6. The information processing method according to claim 5, wherein an arbitrary permutation operation is added to every partial matrix. 